
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

import '../../../utils/ColorUtils.dart';

class OtaUpgradingDialog extends StatefulWidget{

  const OtaUpgradingDialog({super.key,});

  @override
  State<StatefulWidget> createState() {
    return _OtaUpgradingDialog();
  }

}

class _OtaUpgradingDialog extends State<OtaUpgradingDialog>{

  @override
  void initState() {
    // TODO: implement initState
    super.initState();
  }
  @override
  Widget build(BuildContext context) {

    return WillPopScope(
      // 拦截返回按钮
        onWillPop: () async {
          return true;
        },
        child: ConstrainedBox(
          constraints: BoxConstraints.expand(),
          child: GestureDetector(
            onTap: () {

            },
            child: Material(
              color: ColorUtils.color_transparent,
              child: GestureDetector(
                onTap: () {

                },
                child: Center(
                  child: Container(
                    margin: EdgeInsets.symmetric(horizontal: 10),
                    child: Column(
                      mainAxisSize: MainAxisSize.min,
                      children: [
                        Container(
                          padding: const EdgeInsets.symmetric(horizontal: 15),
                          decoration: const ShapeDecoration(
                              color: ColorUtils.color_white,
                              shape:  RoundedRectangleBorder(
                                  borderRadius: BorderRadius.only(
                                      topLeft: Radius.circular(15.0),
                                      topRight: Radius.circular(15.0),
                                      bottomLeft: Radius.circular(15.0),
                                      bottomRight: Radius.circular(15.0)))),
                          child: const Column(
                            mainAxisAlignment: MainAxisAlignment.center,
                            crossAxisAlignment: CrossAxisAlignment.center,
                            children: [
                               SizedBox(height: 20,),
                               Text('正在升级中.......',style: TextStyle(fontSize: 16,color: ColorUtils.color_black),),
                               SizedBox(height: 20,),
                            ],
                          ),
                        ),
                      ],
                    ),
                  ),
                ),
              ),
            ),
          ),
        ));

  }
}